﻿using System;
using System.Architecture;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.Practices.Prism.Regions;
using Windows.UI.Xaml;

namespace HDK.Demo
{
    public class ShellViewModel : ViewModelBase, IRegionMemberLifetime
    {
        public ICommand GoBackCommand { get; private set; }
        public ICommand GoForwardCommand { get; private set; }

        public ShellViewModel()
        {
            GoBackCommand = new DelegateCommand<DependencyObject>(o =>
            {
                RegionManager.RequestGoBack(o);
            });
            GoForwardCommand = new DelegateCommand<DependencyObject>(o =>
            {
                RegionManager.RequestGoForward(o);
            });
        }

        public bool KeepAlive
        {
            get { return true; }
        }
    }
}
